package com.tjetc.test.config;

import org.springframework.context.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gaoyongxiang
 * @version v1.0
 * @date 2025/9/2
 */

@Configuration
//excludeFilters 排除controller包中的扫描
// 由于Spring容器和SpringMVC容器存在父子关系 所以存在重复扫描的情况
@ComponentScan(basePackages = "com.tjetc", excludeFilters = {
        //type： 过滤什么类型 value：排除注解的类型是什么
        @ComponentScan.Filter(type = FilterType.ANNOTATION, value = {Controller.class, RestController.class})
})
@Import({MybatisConfig.class, JdbcConfig.class})
@PropertySource({"classpath:jdbc.properties"})
@EnableTransactionManagement
public class SpringConfig {

}